package bpm.domain.process;

import java.io.Serializable;

/**
 * 
 * @author <a mailto="hwangsyin@gmail.com">King</a>
 *
 */
public class ParticipatorView implements Serializable {
	private static final long serialVersionUID = 1L;
	
	public String processId;
	public String nodeId;
	public String select;
	public String selectStyle;
	public boolean multiSelect;
	public String role;
	public String department;
	public Integer departmentLevel;
	public String processVariable;
	
	public ParticipatorView() {}
	public ParticipatorView(Actor actor) {
		if(actor != null) {
			this.processId = actor.getProcessDefinitionId();
			this.nodeId = actor.getNodeId();
			this.select = actor.getActorType() == null? null : actor.getActorType().name();
			this.selectStyle = actor.getActorStruct() == null? null : actor.getActorStruct().name();
			this.multiSelect = actor.isMultiple();
			this.role = actor.getRoleId();
			this.department = actor.getScope();
			this.departmentLevel = actor.getLevel();
			this.processVariable = actor.getActorVar() == null? null : actor.getActorVar().var();
		}
	}
}
